package com.ssy.lingxi.order.repository;

import com.ssy.lingxi.order.entity.PlatformPurchaseProcessDO;
import com.ssy.lingxi.order.entity.PlatformPurchaseProcessMemberDO;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 平台后台 - 采购流程适用会员Jpa仓库
 * @author 万宁
 * @version 2.0.0
 * @date 2021-07-26
 */
@Repository
public interface PlatformPurchaseProcessMemberRepository extends JpaRepository<PlatformPurchaseProcessMemberDO, Long>, JpaSpecificationExecutor<PlatformPurchaseProcessMemberDO> {
    List<PlatformPurchaseProcessMemberDO> findByProcess(PlatformPurchaseProcessDO purchaseProcess, Sort sort);

    @Transactional
    void deleteByProcess(PlatformPurchaseProcessDO purchaseProcess);

}
